package com.atguigu.gmall.common.feign.seckill;/*
 * @author: XueYouPeng
 * @time: 23.8.2 下午 9:06
 */

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.order.entity.OrderInfo;
import com.atguigu.gmall.seckill.entity.SeckillGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "service-seckill")
public interface SeckillFeignClient {

    @GetMapping(value = "/api/inner/seckill/findAll")
    public Result<List<SeckillGoods>> findAll();

    @GetMapping(value = "/api/inner/seckill/item/{skuId}")
    public Result<SeckillGoods> findBySkuId(@PathVariable(value = "skuId") Long skuId);

    @GetMapping(value = "/api/inner/seckill/findOrderInfoBySkuId/{skuId}")
    public Result<OrderInfo> findOrderInfoBySkuId(@PathVariable(value = "skuId") Long skuId) ;

}
